package com.eduhzy.ttw.clazz.mvp.model.entity;

import com.chad.library.adapter.base.entity.SectionEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * @author xubo
 * @date 2018/12/6 16:08
 */
public class EditGroupData extends SectionEntity<ReviewStudentData> {
    private List<ReviewStudentData> students;

    public EditGroupData(ReviewStudentData t) {
        super(t);
    }

    public EditGroupData(boolean isHeader, String header) {
        super(isHeader, header);
    }

    public EditGroupData setHeader() {
        isHeader = true;
        header = getTeamName();
        return this;
    }

    private int teamId;
    private String teamName;
    private List<ReviewStudentData> groupingList;
    private List<ReviewStudentData> memberList;
    private List<ReviewStudentData> unGroupingList;

    public int getTeamId() {
        return teamId;
    }

    public void setTeamId(int teamId) {
        this.teamId = teamId;
    }

    public String getTeamName() {
        return teamName;
    }

    public void setTeamName(String teamName) {
        this.teamName = teamName;
    }

    public List<ReviewStudentData> getGroupingList() {
        return groupingList;
    }

    public void setGroupingList(List<ReviewStudentData> groupingList) {
        this.groupingList = groupingList;
    }

    public List<ReviewStudentData> getMemberList() {
        return memberList;
    }

    public void setMemberList(List<ReviewStudentData> memberList) {
        this.memberList = memberList;
    }

    public List<ReviewStudentData> getUnGroupingList() {
        return unGroupingList;
    }

    public void setUnGroupingList(List<ReviewStudentData> unGroupingList) {
        this.unGroupingList = unGroupingList;
    }

    public void addStudent(ReviewStudentData studentData) {
        getStudents().add(studentData);
    }

    private List<ReviewStudentData> getStudents() {
        if (students == null) {
            students = new ArrayList<>();
        }
        return students;
    }
}
